#pragma once
#include <vector>
#include <string>
#include "MGlobalDef.h"
#include "Entity.h"

namespace mgl{

struct Mesh : public Entity{

	std::vector<uint>			m_iBuffer;
	std::vector<float>			m_vBuffer;
	std::vector<float>			m_nBuffer;
	std::vector<float>			m_tBuffer;

	unsigned int				m_iBufferId;
	unsigned int				m_vBufferId;
	unsigned int				m_nBufferId;
	unsigned int				m_tBufferId;

	void createBuffer() override;
	void draw() const override;
	void releaseBuffer() override;

	void regenNormal();

};

struct Model : public Entity{

	void readFile(const std::string& path, bool regenNormal = false);

	void createBuffer() override;
	void releaseBuffer() override;
	void draw() const override;

private:

	std::vector<Mesh> m_meshes;



};

}